<div class="isi">
<?php
    $atr = array('id' => 'formID','class' => 'formular');
    echo form_open_multipart('admin_account/simpan', $atr);
?> 
<h5 class="subtitle"> ACCOUNT PAGE </h5>

    <input type="hidden"  name="id" id="id"  value="<?php echo $id ?>"/>
    <input type="hidden"  name="status" id="status"  value="<?php echo $status ?>"/>
    <table width="100%" >
    <tr>
      <td width="15%" ><p> AccountCode  </p> </td>
      <td><p> : </p> </td>
      <td> <input type="text" id="accCode" name="accCode" class="validate[required] text-input" value="<?php echo $accCode;?>"> </td>
    </tr>
    <tr>
      <td width="15%" ><p> Account Class </p> </td>
      <td><p> : </p> </td>
      <td>
        <select name="accClass" id="accClass" class="validate[required] text-input" >
          <option value="">Class : </option>
          <?php
          foreach ($accClass_list as $row) {
              if($row->class_name == $accClass){
                  echo "<option value='$row->csection' selected='selected'> $row->class_name</option>";
              } else {
                  echo "<option value='$row->csection'> $row->class_name</option>";
              }
              
          }
          ?>
        </select>
      </td>
    </tr>
    <tr>
      <td width="15%" ><p> Account Parent </p> </td>
      <td><p> : </p> </td>
      <td>
        <select name="accParent" id="accParent" class="validate[required] text-input" >
          <option value="">Parent : </option>
          <?php
          foreach ($accParent_list as $row) {
              if($row->account_name == $accParent){
                  echo "<option value='$row->account_code' selected='selected'> $row->account_name</option>";
              } else {
                  echo "<option value='$row->account_code'> $row->account_name</option>";
              }
              
          }
          ?>
        </select>
      </td>
    </tr>
    <tr>
      <td width="15%" ><p> Account Code </p> </td>
      <td><p> : </p> </td>
      <td> <input type="text" id="accCode" name="accCode" class="validate[required] text-input" value="<?php echo $accCode;?>"> </td>
    </tr>
    </table>
    <br/>
    <?php echo anchor("admin_account", "Back", "class='button' style='color:#f8f8f8'"); ?>
    <input type="submit" value="         Process       " class="button"/>
</form>
<div class="clear"></div>
</div>   